package com.huawei.gamebox.service.welfare.gift.card;

import android.content.Context;
import android.view.View;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.welfare.common.card.GsTitleCard;
import com.huawei.gamebox.service.welfare.gift.bean.GiftCardBean;
import com.huawei.gamebox.service.welfare.gift.bean.GiftCardListBean;
import o.cgz;
import o.fce;

public class VerticalScrollGiftListCard extends BaseGiftCard {
    private GsTitleCard ˏ = null;

    public VerticalScrollGiftListCard(Context context) {
        super(context);
    }

    public GsTitleCard ˊ() {
        return this.ˏ;
    }

    public void ˊ(GsTitleCard gsTitleCard) {
        this.ˏ = gsTitleCard;
    }

    public cgz ˏ(View view) {
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        if (cardBean != null) {
            int size;
            super.ˏ(cardBean);
            cardBean = (GiftCardListBean) cardBean;
            if (this.ˏ != null) {
                this.ˏ.ˏ(cardBean);
            }
            if (cardBean.ˊ() != null) {
                size = cardBean.ˊ().size();
            } else {
                size = 0;
            }
            for (int i = 0; i < ˋ(); i++) {
                fce o_fce = (fce) ˊ(i);
                if (o_fce != null) {
                    boolean z;
                    if (this.ˏ != null) {
                        z = true;
                    } else {
                        z = false;
                    }
                    o_fce.ˎ(z);
                    if (i >= size) {
                        o_fce.ˉ().setVisibility(8);
                    } else {
                        o_fce.ˉ().setVisibility(0);
                        CardBean cardBean2 = (GiftCardBean) cardBean.ˊ().get(i);
                        cardBean2.ˋˋ(cardBean.ॱˉ());
                        o_fce.ˏ(cardBean2);
                    }
                }
            }
        }
    }
}
